package com.itheima.neibulei2;
/*
成员 私有了
如何访问? 提供公有的访问方式
 */
public class Demo01 {

    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.setI(10);
        System.out.println(outer.getI());
        outer.useShow();
       outer.useInner();
    }
}

class Outer{
    private int i;

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }

    private  void show(){

    }

    public void useShow(){
        show();
    }
    private class Inner{
        int j;
        public void sing(){

        }
    }

    public void useInner(){
        Inner inner = new Inner();
        inner.j=20;
        System.out.println(inner.j);
        inner.sing();


    }
}

